$(document).ready(function () {
	
	$.ui.accordion.animations.custom = function(options) {
		this.slide(options, {
			easing: options.down ? 'easeInOutCirc' : 'easeInOutCirc',
			duration: options.down ? 1000 : 1000
		});
	};
	
	$('#content').accordion({
		header: 'a.section',
		selectedClass: 'active',
		autoHeight: false,
		clearStyle: true,
		animated: 'custom',
		navigation: true,
		navigationFilter: function() {
			// Going to this page with a parameter matching a section name will open the accordion automatically
			return (this.name.toLowerCase() == $(document).getUrlParam('section'));
		}
	});
	
	$('a.thumb').flyout({
		loader: 'customLoader'
	});

	// This fixes hovering over section headers in ie6
	$('a.section').hover(
		function() {$(this).addClass('hover');}, 
		function() {$(this).removeClass('hover');}
	);

	// twitter banner
	$("#banner").click(function() {
	  window.location = "http://www.twitter.com/indiehead"; 
	});
});
